package com.mhc.suzuki.exception;


import com.mhc.suzuki.constant.ErrorCodeEnum;
import lombok.Data;

/**
 * Created by kanon on 17/8/22 13:09.
 */
@Data
public class SuzukiCommonException extends RuntimeException{

    protected String code;

    public SuzukiCommonException() {
        super();
    }

    public SuzukiCommonException(String message) {
        super(message);
    }

    public SuzukiCommonException(Throwable cause) {
        super(cause);
    }

    public SuzukiCommonException(ErrorCodeEnum errorCodeEnum) {
        super(errorCodeEnum.getErrMsg());
        this.code = errorCodeEnum.getErrCode();
    }

    public SuzukiCommonException(String message, Throwable cause) {
        super(message, cause);
    }

}
